package com.mls.client.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("course")
public class CourseController {

    private String prefix = "course";


    /**
     * 课程列表
     */
    @GetMapping("/list")
    public String list(){
        return prefix + "/list";
    }


    /**
     * 课程信息
     */
    @GetMapping("/detail/{courseId}")
    public String detail(@PathVariable String courseId, ModelMap mmap){
        mmap.put("courseId", courseId);
        return prefix + "/detail";
    }

}
